home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
X User Tools
/
X User Tools (O'Reilly and Associates)(1994).ISO
/
sun4c
/
archive
/
tcltk.z
/
tcltk
/
man
/
catn
/
catch.n
< prev
next >
Wrap
Text File
|
1994-09-20
|
1KB
|
67 lines
catch(n) Tcl Built-In Commands
_________________________________________________________________
NAME
catch - Evaluate script and trap exceptional returns
SYNOPSIS
catch _s_c_r_i_p_t ?_v_a_r_N_a_m_e?
_________________________________________________________________
DESCRIPTION
The catch command may be used to prevent errors from abort-
ing command interpretation. Catch calls the Tcl interpreter
recursively to execute _s_c_r_i_p_t, and always returns a TCL_OK
code, regardless of any errors that might occur while exe-
cuting _s_c_r_i_p_t. The return value from catch is a decimal
string giving the code returned by the Tcl interpreter after
executing _s_c_r_i_p_t. This will be 0 (TCL_OK) if there were no
errors in _s_c_r_i_p_t; otherwise it will have a non-zero value
corresponding to one of the exceptional return codes (see
tcl.h for the definitions of code values). If the _v_a_r_N_a_m_e
argument is given, then it gives the name of a variable;
catch will set the variable to the string returned from
_s_c_r_i_p_t (either a result or an error message).
KEYWORDS
catch, error
Tcl 1